import Mock from 'mockjs'

const List = []
const count = 5

for (let i = 0; i < count; i++) {
  List.push(Mock.mock({
    id: '@increment',
    orderId: 'BY2017N' + '@increment',
    'customerName|1': ['张三', '薛小前', '欧阳大川', '西门吹雪'],
    customerCode: Mock.Random.word(5, 10),
    'customerPhone|1': ['13531544954', '13632250649', '15820292420', '15999905612'],
    'deliverGoodsTime': '@datetime',
    'freight|1': ['中联物流', '德众物流', '成都物流', '金鑫物流', '成都万利达物流'],
    'freightPhone|1': ['028-9876232', '0817-23674522', '0755-98623437'],
    'freightAddress|1': ['广东省深圳市南山区田厦金牛广场A座20楼', '四川省成都市武侯区川藏立交八益广场后', '四川省成都市郫县西郡英华后'],
    'remarks|1': ['三天到', '下周结婚，必须下周到', '一周内到', '下个月到'],
    'orderStatus|1': ['NEW', 'DELIVERED', 'CANCEL'],
    'createTime': '@datetime',
    'orderType|1': ['SEND', 'RETAIL', 'MERCHANT', 'DISTRIBUTOR'],
    'paymentStatus|1': ['PAYOFF', 'UNPAID'],
    'deposit|1': ['200', '300', '500', '1000'],
    'totalMoney|1': ['200', '300', '500', '1000'],
    'actualMoney|1': ['2003', '3003', '5003', '10004']
  }))
}

export default{
  getList: (params) => {
    const temp = {
      pageNo: 1,
      pageSize: 20,
      totalPage: 49
    }
    return {
      success: true,
      data: List,
      message: '获取订单列表成功',
      pageVo: temp
    }
  }
}
